//
//  AcHuHeader.h
//  need
//
//  Created by AcHu on 15/11/5.
//  Copyright (c) 2015年 oc. All rights reserved.
//
#import "HuJudgeTools.h"
#import "HuUITools.h"
#import "HuManageTools.h"
#import "CommonTool.h"
#import "MBProgressHUD.h"
#import "NetHttp.h"
#import "NetWork.h"
//#import "InfoShare.h"
#import "UIImageView+WebCache.h"

#ifndef need_AcHuHeader_h
#define need_AcHuHeader_h
//开会即可；了和健康了健康了及刻录机；就 
//颜色
#define RGB_OX(OXRGB) [UIColor colorWithRed:((float)((OXRGB & 0xFF0000) >> 16))/255.0 green:((float)((OXRGB & 0xFF00) >> 8))/255.0 blue:((float)(OXRGB & 0xFF))/255.0 alpha:1.0]//rgb宏定义 使用RGBHEXCOLOR(0xec6941)
#define RGBA(R,G,B,A) [UIColor colorWithRed:R/255.0 green:G/255.0 blue:B/255.0 alpha:A]//带透明度
#define RGB(R,G,B) RGBA(R,G,B,1.0)//不带透明度
#define CLEARCOLOR [UIColor clearColor]//清除颜色
#define NAVCOLOR MAINColor

#define MAINColor RGB(3,163,116)
#define MAINTextColor RGB(10,10,10)

//全局普通弹框文字提示时间
#define ProgressTime 1.f

//字
#define FONT_SYS(SIZE) [UIFont systemFontOfSize:SIZE]
#define FONT_BOLD(SIZE) [UIFont boldSystemFontOfSize:SIZE]
#define FONT_NAME(N,S) [UIFont fontWithName:(N) size:(S)]

//尺寸
#define WIDE [UIScreen mainScreen].bounds.size.width//屏幕宽
#define HEIGHT [UIScreen mainScreen].bounds.size.height//屏幕高
#define VIEW_W(VIEW) CGRectGetWidth(VIEW.frame)//视图宽
#define VIEW_H(VIEW) CGRectGetHeight(VIEW.frame)//视图高
#define VIEW_XMIN(VIEW) CGRectGetMinX(VIEW.frame)//视图最小x
#define VIEW_YMIN(VIEW) CGRectGetMinY(VIEW.frame)//视图最小y
#define VIEW_XMAX(VIEW) CGRectGetMaxX(VIEW.frame)//视图最大x
#define VIEW_YMAX(VIEW) CGRectGetMaxY(VIEW.frame)//视图最大y
#define VIEW_CenterX(VIEW) VIEW_W(VIEW)/2.0//视图中心x
#define VIEW_CenterY(VIEW) VIEW_H(VIEW)/2.0//视图中心y
#define Empty_Distance 15

//userDefault
#define USER_DEFAULTSet(id,key) [[NSUserDefaults standardUserDefaults] setObject:id forKey:key];[[NSUserDefaults standardUserDefaults] synchronize]//存值
#define USER_DEFAULTGet(key) [[NSUserDefaults standardUserDefaults]objectForKey:key]//取值

//手机型号
#define ISP4 (H_EIGHT == 480.0 ? YES : NO)
#define ISP6P (H_EIGHT == 736.0 ? YES : NO)
#define ISP5 (H_EIGHT == 568.0 ? YES : NO)
#define ISP6 (H_EIGHT == 667.0 ? YES : NO)

//图片
#define IMAGE_URLSTR(STR) [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:STR]]]
#define IMAGE_NAME(STR) [UIImage imageNamed:STR]

//网址
#define URL(urlStr) [NSURL URLWithString:urlStr]

//放大与旋转
#define ROTATION(view,angle) view.transform=CGAffineTransformMakeRotation((float)angle * M_PI / 180.f)//旋转
#define SCALE(view,scale) view.transform =CGAffineTransformMakeScale((float)scale, (float)scale)//等比例放大
#define RotAndScale(view,scale,angle) view.transform=CGAffineTransformRotate(CGAffineTransformMakeScale((float)scale, (float)scale),(float)angle * 180.0 / M_PI )//放大加旋转

//获取系统版本
#define IOS_VERSION [[[UIDevice currentDevice] systemVersion] floatValue]
#define CurrentSystemVersion [[UIDevice currentDevice] systemVersion]

//判断是否更新
#define App

//G－C－D
#define GCD_BACK(block) dispatch_async(dispatch_get_global_queue(0, 0), block)//串行异步
#define GCD_MAIN(block) dispatch_async(dispatch_get_main_queue(),block)//回到主线程

//debug模式NSlog知道打印地址
#ifdef DEBUG 
#define NSLog(FORMAT, ...) fprintf(stderr,"%s:%d  \t%s\n",[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);
#else
#define NSLog(FORMAT, ...) nil
#endif

#endif
